#pragma once
#define WIN32_LEAN_AND_MEAN	
#define _CRT_SECURE_NO_DEPRECATE
#include <windows.h>
#include <objbase.h>
#include "CXueYuFa.h"
#include "UIlib.h"

using namespace DuiLib;
class CGrammarResult : public CWindowWnd, public INotifyUI
{
public:
	CGrammarResult(CString &strGramAnswerResult)
	{	
		m_strGramAnswerResult = strGramAnswerResult;
		m_pXuYuFaObj = NULL;
	};

	VOID SetXuYuFaPointer( CXueYuFa *pObj)
	{
		m_pXuYuFaObj = pObj;
	}

	UINT GetClassStyle() const 
	{ 
		return UI_CLASSSTYLE_FRAME | CS_DBLCLKS; 
	};
	void OnFinalMessage(HWND /*hWnd*/) 
	{ 
		/*delete this;*/
	};
	void Init() { }
	void OnPrepare(TNotifyUI& msg);
	void Notify(TNotifyUI& msg);
	LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
	void InitDictControls(TNotifyUI& msg);
	void GrammarResultQuestionDetail();

	//void InitDictWord(int nIndex);
	virtual LPCTSTR GetWindowClassName() const;
public:
	CPaintManagerUI m_PaintManager;

	CString m_strGramAnswerResult; 
	SplitResultVector m_strGramResultAll;

	CXueYuFa *m_pXuYuFaObj;
};